﻿using AVIS.OutBound.Orders.Cache;
using AVIS.OutBound.RateCodes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVIS.OutBound.Orders
{
    public interface IBookOrderManager
    {
        /// <summary>
        /// 订单保存
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        BookOrderCacheItem SaveBookOrderCache(BookOrder input);

        /// <summary>
        /// 获取指定OrderID的预定单
        /// </summary>
        /// <param name="orderId"></param>
        /// <param name="orderNo"></param>
        /// <param name="surname"></param>
        /// <returns></returns>
        BookOrder GetBookOrder(string orderId);

        /// <summary>
        /// 提交订单到Wizard接口并保持订单信息到数据库
        /// </summary>
        /// <param name="order">订单</param>
        /// <returns></returns>
        Order SubmitOrder(Order order);

        /// <summary>
        /// 取消订单，通过Wizard接口取消并修改数据库的订单信息，最后发送订单取消事件
        /// </summary>
        /// <param name="order">订单</param>
        /// <returns></returns>
        CancelOrderOutput CancelOrder(AgentCancelOrderRequest request);



        /// <summary>
        /// 根据订单号和用户姓查询订单
        /// </summary>
        /// <param name="OrderNo"></param>
        /// <param name="Surname"></param>
        /// <returns></returns>
        Order QueryOrder(string OrderNo, string Surname);



    }
}
